import type { FormItemProps } from "ant-design-vue/es/form";
import type { ColProps } from "ant-design-vue/es/grid";
import type { InputProps, TextAreaProps } from 'ant-design-vue/es/input'
import type { InputNumberProps } from 'ant-design-vue/es/input-number'
import type { CascaderProps } from 'ant-design-vue/es/cascader'
import type { CheckboxProps } from 'ant-design-vue/es/checkbox'
import type { RadioProps } from 'ant-design-vue/es/radio'
import type { SelectProps } from 'ant-design-vue/es/select'
import type { SwitchProps } from 'ant-design-vue/es/switch'
import type { TreeSelectProps } from 'ant-design-vue/es/tree-select'
import type { DatePickerProps } from 'ant-design-vue/es/date-picker'
import type { TimePickerProps } from 'ant-design-vue/es/time-picker'

// 元素类型
type element = 'input' | 'password' | 'textarea' | 'number' | 'money' | 'cascader' | 'checkbox' | 'radio' | 'select' | 'switch'
              | 'treeselect' | 'datepicker' | 'timepicker' | 'file' | 'selAddress'

export interface _IFormEl {
  key: string | number,
  label: string,
  element: element,
  formItemProps?: FormItemProps,
  col?: ColProps,
  componentProps?: InputProps | TextAreaProps | InputNumberProps | CascaderProps | CheckboxProps 
                   | RadioProps | SelectProps | SwitchProps | TreeSelectProps | DatePickerProps | TimePickerProps,
  hide?: boolean | any
}

export interface _IExtra {
  [key: string]: any
}